Hi All,
My DOORS customisation now contains a number of formal module menus (addins folder) and DOORS (config folder) menu item. Is it possible to configure formal module menus so that they are only visible on modules within a specific project? For obvious reasons the code executed by the added formal module is applicable to specific module structures.
Regards
Mark
mwilliamson - Wed Feb 04 05:09:11 EST 2009 |
|
Re: Visibility of Module and DOORS menus Tony_Goodman - Wed Feb 04 06:18:16 EST 2009
Menu availability is controlled by a mapping function - this is the first parameter in the createItem() and createMenu() functions.
This function must return one of the following values:
menuAvailable_
menuUnavailable_
menuInvisible_
You will need to create your own mapping function:
int myMappingFunction()
{
// test for specific project and return one of the above values.
}
Place this function in a *.inc file and put the file in config/baseWindowCallbacks directory.
|
|
Re: Visibility of Module and DOORS menus mwilliamson - Wed Feb 04 06:39:24 EST 2009 Tony_Goodman - Wed Feb 04 06:18:16 EST 2009
Menu availability is controlled by a mapping function - this is the first parameter in the createItem() and createMenu() functions.
This function must return one of the following values:
menuAvailable_
menuUnavailable_
menuInvisible_
You will need to create your own mapping function:
int myMappingFunction()
{
// test for specific project and return one of the above values.
}
Place this function in a *.inc file and put the file in config/baseWindowCallbacks directory.
Hi Tony,
Thanks for your prompt response. I appreciate that I can dictate the visibility of DOORS Explorer menus via the mapping function. I'm more concerned about the module (addin) menus. As they are displayed within the module by virtue of the menu folder presence within the addins folder. Is it also possible to manage these via createMenu and CreateItem functions?
Regards
Mark
|
|
Re: Visibility of Module and DOORS menus Tony_Goodman - Wed Feb 04 07:26:28 EST 2009 mwilliamson - Wed Feb 04 06:39:24 EST 2009
Hi Tony,
Thanks for your prompt response. I appreciate that I can dictate the visibility of DOORS Explorer menus via the mapping function. I'm more concerned about the module (addin) menus. As they are displayed within the module by virtue of the menu folder presence within the addins folder. Is it also possible to manage these via createMenu and CreateItem functions?
Regards
Mark
If menus are created using the addins folder methid, then you do not have any control over the visibility of the menus.
You can create module menus in exactly the same way as you can explorer menus.
Put your dxl file containing the menu creation script into config/formalFiles.
See Creating Menus
|
|
Re: Visibility of Module and DOORS menus mwilliamson - Wed Feb 04 08:16:15 EST 2009 Tony_Goodman - Wed Feb 04 07:26:28 EST 2009
If menus are created using the addins folder methid, then you do not have any control over the visibility of the menus.
You can create module menus in exactly the same way as you can explorer menus.
Put your dxl file containing the menu creation script into config/formalFiles.
See Creating Menus
Hi Tony,
That is great info. Thanks for the hyperlink. I shall tackle that later and hopefully tidy up the provision of menus to modules that actually support them.
Cheers
Mark
|
|
Re: Visibility of Module and DOORS menus mwilliamson - Thu Feb 05 06:22:22 EST 2009 Tony_Goodman - Wed Feb 04 07:26:28 EST 2009
If menus are created using the addins folder methid, then you do not have any control over the visibility of the menus.
You can create module menus in exactly the same way as you can explorer menus.
Put your dxl file containing the menu creation script into config/formalFiles.
See Creating Menus
Hi Tony,
Following your advice, I have removed the menu dxl files from the addins folder and utilised the createMenu,Item structure in a dxl file located in \config\formalFiles. I have also created a menuMapping() function and placed that in an include file in \baseWindowCallBacks. I believe the function is being called within the include but am having problems with the returned value. The test within the function for correct project is working great with a simple print but I when I add the menuAvailable_ and menuInvisible_ it falls over.
As usual the DXL reference manual gives no example on how to reference these perms.
Regards
Mark
|
|
Re: Visibility of Module and DOORS menus Tony_Goodman - Thu Feb 05 06:48:28 EST 2009 mwilliamson - Thu Feb 05 06:22:22 EST 2009
Hi Tony,
Following your advice, I have removed the menu dxl files from the addins folder and utilised the createMenu,Item structure in a dxl file located in \config\formalFiles. I have also created a menuMapping() function and placed that in an include file in \baseWindowCallBacks. I believe the function is being called within the include but am having problems with the returned value. The test within the function for correct project is working great with a simple print but I when I add the menuAvailable_ and menuInvisible_ it falls over.
As usual the DXL reference manual gives no example on how to reference these perms.
Regards
Mark
I might have given you a bum steer on the directory location...
Trouble is I can't check it here because I am working on a completely locked-down system and I have no access to that area.
For now you could just use the integer values instead:
print menuAvailable_ "\n" // 1
print menuInvisible_ "\n" // 3
print menuUnavailable_ "\n" // 0
Not sure what happened to 2 :-)
|
|
Re: Visibility of Module and DOORS menus mwilliamson - Thu Feb 05 07:03:42 EST 2009 Tony_Goodman - Thu Feb 05 06:48:28 EST 2009
I might have given you a bum steer on the directory location...
Trouble is I can't check it here because I am working on a completely locked-down system and I have no access to that area.
For now you could just use the integer values instead:
print menuAvailable_ "\n" // 1
print menuInvisible_ "\n" // 3
print menuUnavailable_ "\n" // 0
Not sure what happened to 2 :-)
Hi Tony,
Apologies for my stumblings with "undocumented features".
I'm sure that my mapping function is being called and I know that the test withi the function works. It is just the syntax of the return that I seem to be missing. When a formal module is opened the following dxl error is displayed: <C:\Program Files\Telelogic\DOORS 9.1/lib/dxl/config/baseWindowCallbackFiles/TTGmenuMapping.inc:4> function terminated without executing return statement.
int menuMapping()
{
Project p = current
string s = name( p)
if (s == "Terminal Test Generator")
{
menuAvailable_
}
else
{
menuInvisible_
}
}
Thanks
Mark
|
|
Re: Visibility of Module and DOORS menus Tony_Goodman - Thu Feb 05 10:17:00 EST 2009 mwilliamson - Thu Feb 05 07:03:42 EST 2009
Hi Tony,
Apologies for my stumblings with "undocumented features".
I'm sure that my mapping function is being called and I know that the test withi the function works. It is just the syntax of the return that I seem to be missing. When a formal module is opened the following dxl error is displayed: <C:\Program Files\Telelogic\DOORS 9.1/lib/dxl/config/baseWindowCallbackFiles/TTGmenuMapping.inc:4> function terminated without executing return statement.
int menuMapping()
{
Project p = current
string s = name( p)
if (s == "Terminal Test Generator")
{
menuAvailable_
}
else
{
menuInvisible_
}
}
Thanks
Mark
LOL
You missed out the return statements!
I would also add a test for null project.
int menuMapping()
{
Project p = current
if (null(p) || name(p) != "Terminal Test Generator")
{
return(menuAvailable_)
}
return(menuInvisible_)
}
|
|
Re: Visibility of Module and DOORS menus mwilliamson - Thu Feb 05 10:35:03 EST 2009 Tony_Goodman - Thu Feb 05 10:17:00 EST 2009
LOL
You missed out the return statements!
I would also add a test for null project.
int menuMapping()
{
Project p = current
if (null(p) || name(p) != "Terminal Test Generator")
{
return(menuAvailable_)
}
return(menuInvisible_)
}
Tony,
The return statements are in my code. I removed them from my snippet as I wasn't sure of the syntax(brackets). Even with the return(menuAvailable_) statement I get the same dxl error. Is it necessary to specify the include file in the createMenu statement?
createMenu(menuMapping(), "TTG", 'D', null)
Can't believe a simple matter of adding a project sensitive formal module menu can be so troublesome...
Thanks
Mark
|
|
Re: Visibility of Module and DOORS menus mwilliamson - Thu Feb 05 11:08:11 EST 2009 mwilliamson - Thu Feb 05 10:35:03 EST 2009
Tony,
The return statements are in my code. I removed them from my snippet as I wasn't sure of the syntax(brackets). Even with the return(menuAvailable_) statement I get the same dxl error. Is it necessary to specify the include file in the createMenu statement?
createMenu(menuMapping(), "TTG", 'D', null)
Can't believe a simple matter of adding a project sensitive formal module menu can be so troublesome...
Thanks
Mark
Update:
Following DOORS Restart, Module menu is still visible outside specified project in formal modules.
Selection of menu option in any module crashes DOORS with diagnostic output and the following dxl error.
-R-E- DXL: <Line:0> incorrect return statement
-R-E- DXL: <Line:0> incorrect return statement
Rapidly losing the plot.
Regards
Mark
|
|
Re: Visibility of Module and DOORS menus SystemAdmin - Mon Jun 15 05:35:36 EDT 2009 mwilliamson - Thu Feb 05 11:08:11 EST 2009
Update:
Following DOORS Restart, Module menu is still visible outside specified project in formal modules.
Selection of menu option in any module crashes DOORS with diagnostic output and the following dxl error.
-R-E- DXL: <Line:0> incorrect return statement
-R-E- DXL: <Line:0> incorrect return statement
Rapidly losing the plot.
Regards
Mark
Hello,
I am kind of newbie to DOORS and DXL (but my predecessor was a senior dxl developer).
Since we have switched from DOORS 8.2 to 8.3 we got an error in one of our user defined menues. These menues dialogs are used in the modules (for specification export).
We extend the WORD export and made a configuration dialog for it.
I can change a list (with authorized users) in this dialog but when I try to save (press the save button in the module or. ctrl+s) these changes I get the following error message:
-R-E- DXL: <Line:0> incorrect return statement
-R-E- DXL: <Line:0> incorrect return statement
So my question is if there is a way to get more detailed error description or a kind of debugging for DOORS/dxl.
Thanks a lot in advanced!
Regards
René Happich
|
|
Re: Visibility of Module and DOORS menus IBM_Gust - Mon Jun 15 07:29:45 EDT 2009 SystemAdmin - Mon Jun 15 05:35:36 EDT 2009
Hello,
I am kind of newbie to DOORS and DXL (but my predecessor was a senior dxl developer).
Since we have switched from DOORS 8.2 to 8.3 we got an error in one of our user defined menues. These menues dialogs are used in the modules (for specification export).
We extend the WORD export and made a configuration dialog for it.
I can change a list (with authorized users) in this dialog but when I try to save (press the save button in the module or. ctrl+s) these changes I get the following error message:
-R-E- DXL: <Line:0> incorrect return statement
-R-E- DXL: <Line:0> incorrect return statement
So my question is if there is a way to get more detailed error description or a kind of debugging for DOORS/dxl.
Thanks a lot in advanced!
Regards
René Happich
No crutches in DXL. Good point is you learn by woking in the trenches.
|
|